# coding=utf-8
#from django.contrib import auth
    
def isLogin(request):
    if request.user.is_authenticated() and request.user.is_active:
        return True
    else:
        return False

def checkCookie(request):
    if request.session.test_cookie_worked():
        request.session.delete_test_cookie()
        return True
    else:
        return False
